import java.util.Scanner;

public class c3 {
    public static void main(String[] args) {
        System.out.println(chanfgangxing(2, 3));
    }
//定义三个有参数有返回值方法，分别实现计算三角形、正方形、长方形的面积。
    public static double chanfgangxing(double a,double h) {
        Scanner scanner = new Scanner(System.in);

        double S = a * h;
        return S;
    }
    public static double zhengfangxing(double h) {
        Scanner scanner = new Scanner(System.in);
        double S = h * h;
        return (S);
    }
    public static double sanjiapxing(double a,double h) {
        Scanner scanner = new Scanner(System.in);
        double S = 1 / 2 * a * h;
        return (S);

    }
}


